<?
include ('header.php');
if(!isset($data['id'])){
echo "<script>document.location.href='index.php'</script>";
exit;
}
?>






<div class="block medium right">
			<div class="top">	
                  <h1>Transfer Coins</h1>
            </div>
			<div class="content">
			<div class="infobox">
			<center>


<font size=4>
<form action="transferdone.php" method="post">

<?

$result = mysql_query("SELECT * FROM users where login='$_POST[member]' ") 
or die(mysql_error());  


while($row = mysql_fetch_array( $result )) {

	// Print out the contents of each row into a table


$returned_rows = mysql_num_rows ($result);
}

if ($returned_rows == 0){
echo "Member not found <BR><BR>"; } else { ?>

Transfer to: <? echo $_POST[member];?><BR><BR>

<input type="hidden" name="member" value="<? echo $_POST[member];?>">


<?



$balance = $data['coins']-$_POST[coins];

if ($balance < '0'){
echo "You dont have enough coins";

}else{ ?>





Amount coins: <?echo $_POST[coins];?><BR><Br>
<input type="hidden" name="coins" value="<? echo $_POST[coins];?>">

<input type="Submit" value="Confirm" />



<? } } ?>



</font>

<BR><BR>

</div>
</div>
</div>

<?
include ('footer.php'); ?>






 